<html xmlns="http://www.w3c.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<script type="text/javascript">
		//<![CDATA[
		//debe usarse los \\:  en lugar de : en los selectores de JQuery
		$(document).ready(function() {
			wizardSetCurrentPageStyle('form_wizard:contactData');

		});
		//]]>
	</script>
</h:head>
<h:body>

	<h:form id="form_innovation_data">
		<h2>
			<h:outputLabel
				value="Asistencia Tecnica Agraria  Columnas creadas: #{aSession.selectedAssistenceRegister.visitDataDTO.size}" />
		</h2>


		<!-- Produccion -->
		<!-- 		<p:blockUI block="tableInnovation" widgetVar="buitableInnovation" /> -->


		<!-- Ejemplo mostrar un dato por asistencia tecnica -->
		<p:panel id="tableAssistance">
			<p:panel>

				<div class="clearfix"
					style="padding-bottom: 2em; padding-left: 2em;">
					<div class="ui-form-row-2col clearfix">
						<div class="ui-form-col" style="width: 12%">
							<h:outputLabel value="" />
						</div>
						<div class="ui-form-col">
							<p:dataGrid var="registerItem"
								value="#{aSession.selectedAssistenceRegister.visitDataDTO.index}"
								emptyMessage="" rows="1"
								columns="#{aSession.selectedAssistenceRegister.visitDataDTO.size}">
								<p:inputText value="Visita Tecnica No.#{registerItem}"
									styleClass="ui-itemrow" />
							</p:dataGrid>
						</div>
					</div>
				</div>

				<div class="clearfix common-panel">
					<div class="ui-form-row-2col clearfix">
						<div class="ui-form-col" style="width: 12%">
							<h:outputLabel value="Consecutivo" />
						</div>
						<div class="ui-form-col">
							<p:dataGrid id="item" var="registerItem"
								value="#{aSession.selectedAssistenceRegister.visitDataDTO.consecutive}"
								emptyMessage="" rows="1"
								columns="#{aSession.selectedAssistenceRegister.visitDataDTO.size}">
								<p:inputText value="#{registerItem.valueTxt}"
									styleClass="ui-itemrow" />
							</p:dataGrid>
						</div>
					</div>
				</div>

				<!--  dos ejemplos (row 10 row 50) de mostrar un conjunto de rows para un campo de asistencia tecnica (por ejemplo Plagas)-->
				<!-- ROW 10 -->
				<div class="clearfix common-panel">
					<p:dataGrid id="row10" var="register"
						value="#{aSession.selectedAssistenceRegister.visitDataDTO.row10}"
						columns="1" emptyMessage="" styleClass="ui-item-grid">
						<div class="ui-form-row-2col clearfix">
							<div class="ui-form-col" style="width: 12%">
								<h:outputLabel value="#{register.rowId}" />
							</div>
							<div class="ui-form-col">
								<p:dataGrid id="item" var="registerItem"
									value="#{register.items}" emptyMessage="" rows="1"
									columns="#{aSession.selectedAssistenceRegister.visitDataDTO.size}"
									styleClass="ui-item-subgrid">
									<p:inputText value="#{registerItem.value}"
										styleClass="ui-itemrow" />
								</p:dataGrid>
							</div>
						</div>
					</p:dataGrid>
				</div>

				<!-- ROW 50 -->
				<div class="ui-form-row-2col clearfix common-panel">


					<p:dataGrid id="row50" var="register"
						value="#{aSession.selectedAssistenceRegister.visitDataDTO.row50}"
						columns="1" emptyMessage="" styleClass="ui-item-grid">

						<div class="ui-form-row-2col clearfix">
							<div class="ui-form-col" style="width: 12%">
								<h:outputLabel value="#{register.rowId}" />
							</div>
							<div class="ui-form-col">
								<p:dataGrid id="item50" var="registerItem"
									value="#{register.items}" emptyMessage="" rows="1"
									columns="#{aSession.selectedAssistenceRegister.visitDataDTO.size}"
									styleClass="ui-item-subgrid">
									<p:inputText value="#{registerItem.value}"
										styleClass="ui-itemrow" />
								</p:dataGrid>
							</div>
						</div>
					</p:dataGrid>
				</div>
			</p:panel>
		</p:panel>

		<div class="buttons-container clearfix text-align-right">
			<p:commandButton value="#{i18n['lbl.flow_button.cancel']}"
				styleClass="ui-flowbutton"
				oncomplete="currentPage('list_owner_data.xhtml')"
				actionListener="#{stepByStepController.cancelRuatRegister}" />
			<p:commandButton value="#{i18n['lbl.flow_button.back']}"
				oncomplete="setCurrentPageStyle(xhr, status, args,this)"
				styleClass="ui-flowbutton" update="form_innovation_data"
				actionListener="#{stepByStepController.viewEconomicData}" />
			<p:commandButton value="#{i18n['lbl.flow_button.save_and_next']}"
				oncomplete="setCurrentPageStyle(xhr, status, args,this)"
				styleClass="ui-flowbutton" validateClient="true"
				update="form_innovation_data"
				actionListener="#{stepByStepController.viewAssociativityData}"
				id="savenext" />
		</div>
		<p:blockUI block="savenext" trigger="savenext" />

	</h:form>
</h:body>

<script type="text/javascript">
	//<![CDATA[
	//debe usarse los \\:  en lugar de : en los selectores de JQuery
	$(document).ready(function() {
	});
	//]]>
</script>

</html>